Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
gtk_text_update_cached_style_values (self);
- if (change == NULL ||
- gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT |
+ if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT |
GTK_CSS_AFFECTS_BACKGROUND |
GTK_CSS_AFFECTS_CONTENT))
- gtk_widget_queue_draw (GTK_WIDGET (self));
+ gtk_widget_queue_draw (widget);
+
+ if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_ATTRS))
+ gtk_text_recompute (self);
}
static void